<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sysCompanyBean.id}"/>
		<f:event type="preRenderView" listener="#{sysCompanyBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sys Company"/>

	<ui:define name="header">
		Sys Company
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sysCompanyBean.id}">
				Edit existing Sys Company
			</c:when>
			<c:otherwise>
				Create a new Sys Company
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sysCompanyBeanSysCompanyComNo" value="Com No:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyBeanSysCompanyComNo" required="true" value="#{sysCompanyBean.sysCompany.comNo}"/>
					<h:message for="sysCompanyBeanSysCompanyComNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sysCompanyBeanSysCompanySysTitleName" value="Sys Title Name:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysTitleNameBean.converter}" id="sysCompanyBeanSysCompanySysTitleName" value="#{sysCompanyBean.sysCompany.sysTitleName}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysTitleNameBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sysCompanyBeanSysCompanySysTitleName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanySysCurrency" value="Sys Currency:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysCurrencyBean.converter}" id="sysCompanyBeanSysCompanySysCurrency" value="#{sysCompanyBean.sysCompany.sysCurrency}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysCurrencyBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sysCompanyBeanSysCompanySysCurrency" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanyComCode" value="Com Code:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyBeanSysCompanyComCode" maxLength="50" value="#{sysCompanyBean.sysCompany.comCode}"/>
					<h:message for="sysCompanyBeanSysCompanyComCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanyComName" value="Com Name:"/>
				<h:panelGroup>
					<h:inputText id="sysCompanyBeanSysCompanyComName" maxLength="300" value="#{sysCompanyBean.sysCompany.comName}"/>
					<h:message for="sysCompanyBeanSysCompanyComName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanySysCompanySubsForSubComNo" value="Sys Company Subs For Sub Com No:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysCompanyBean.sysCompany.sysCompanySubsForSubComNo}"/>
					<h:dataTable id="sysCompanyBeanSysCompanySysCompanySubsForSubComNo" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Company By Com No"/>
							</f:facet>
							<h:link outcome="/sysCompanySub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysCompanyByComNo" value="#{forgeview:display(_item.sysCompanyByComNo)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysCompanyBean.converter}" id="sysCompanySubBeanAddSysCompanyByComNo" value="#{sysCompanySubBean.add.sysCompanyByComNo}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysCompanyBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysCompanySubBeanAddSysCompanyByComNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sub Com Descr"/>
							</f:facet>
							<h:link outcome="/sysCompanySub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSubComDescr" value="#{_item.subComDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCompanySubBeanAddSubComDescr" maxLength="100" value="#{sysCompanySubBean.add.subComDescr}"/>
								<h:message for="sysCompanySubBeanAddSubComDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysCompanySubBean.added)}" id="sysCompanyBeanSysCompanySysCompanySubsForSubComNoAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysCompanySubBean.add.sysCompanyBySubComNo}" value="#{sysCompanyBean.sysCompany}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanySysCompanySubsForComNo" value="Sys Company Subs For Com No:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysCompanyBean.sysCompany.sysCompanySubsForComNo}"/>
					<h:dataTable id="sysCompanyBeanSysCompanySysCompanySubsForComNo" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Company By Sub Com No"/>
							</f:facet>
							<h:link outcome="/sysCompanySub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysCompanyBySubComNo" value="#{forgeview:display(_item.sysCompanyBySubComNo)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysCompanyBean.converter}" id="sysCompanySubBeanAddSysCompanyBySubComNo" value="#{sysCompanySubBean.add.sysCompanyBySubComNo}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysCompanyBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysCompanySubBeanAddSysCompanyBySubComNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sub Com Descr"/>
							</f:facet>
							<h:link outcome="/sysCompanySub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSubComDescr" value="#{_item.subComDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCompanySubBeanAddSubComDescr" maxLength="100" value="#{sysCompanySubBean.add.subComDescr}"/>
								<h:message for="sysCompanySubBeanAddSubComDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysCompanySubBean.added)}" id="sysCompanyBeanSysCompanySysCompanySubsForComNoAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysCompanySubBean.add.sysCompanyByComNo}" value="#{sysCompanyBean.sysCompany}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanySysOrgs" value="Sys Orgs:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysCompanyBean.sysCompany.sysOrgs}"/>
					<h:dataTable id="sysCompanyBeanSysCompanySysOrgs" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Org No"/>
							</f:facet>
							<h:link outcome="/sysOrg/view">
								<f:param name="id" value="#{_item.orgNo}"/>
								<h:outputText id="itemOrgNo" value="#{_item.orgNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysOrgBeanAddOrgNo" value="#{sysOrgBean.add.orgNo}"/>
								<h:message for="sysOrgBeanAddOrgNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysOrgBean.added)}" id="sysCompanyBeanSysCompanySysOrgsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysOrgBean.add.sysCompany}" value="#{sysCompanyBean.sysCompany}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanySysCompanyNewses" value="Sys Company Newses:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysCompanyBean.sysCompany.sysCompanyNewses}"/>
					<h:dataTable id="sysCompanyBeanSysCompanySysCompanyNewses" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Com News No"/>
							</f:facet>
							<h:link outcome="/sysCompanyNews/view">
								<f:param name="id" value="#{_item.comNewsNo}"/>
								<h:outputText id="itemComNewsNo" value="#{_item.comNewsNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCompanyNewsBeanAddComNewsNo" value="#{sysCompanyNewsBean.add.comNewsNo}"/>
								<h:message for="sysCompanyNewsBeanAddComNewsNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysCompanyNewsBean.added)}" id="sysCompanyBeanSysCompanySysCompanyNewsesAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysCompanyNewsBean.add.sysCompany}" value="#{sysCompanyBean.sysCompany}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCompanyBeanSysCompanySysCompanyAddrs" value="Sys Company Addrs:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysCompanyBean.sysCompany.sysCompanyAddrs}"/>
					<h:dataTable id="sysCompanyBeanSysCompanySysCompanyAddrs" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Addr 01"/>
							</f:facet>
							<h:link outcome="/sysCompanyAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysAddr01" value="#{forgeview:display(_item.sysAddr01)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysAddr01Bean.converter}" id="sysCompanyAddrBeanAddSysAddr01" value="#{sysCompanyAddrBean.add.sysAddr01}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysAddr01Bean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysCompanyAddrBeanAddSysAddr01" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Addr Type"/>
							</f:facet>
							<h:link outcome="/sysCompanyAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysAddrType" value="#{forgeview:display(_item.sysAddrType)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysAddrTypeBean.converter}" id="sysCompanyAddrBeanAddSysAddrType" value="#{sysCompanyAddrBean.add.sysAddrType}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysAddrTypeBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysCompanyAddrBeanAddSysAddrType" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Com Addr No"/>
							</f:facet>
							<h:link outcome="/sysCompanyAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemComAddrNo" value="#{_item.comAddrNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCompanyAddrBeanAddComAddrNo" maxLength="20" value="#{sysCompanyAddrBean.add.comAddrNo}"/>
								<h:message for="sysCompanyAddrBeanAddComAddrNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Com Addr Moo"/>
							</f:facet>
							<h:link outcome="/sysCompanyAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemComAddrMoo" value="#{_item.comAddrMoo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCompanyAddrBeanAddComAddrMoo" maxLength="10" value="#{sysCompanyAddrBean.add.comAddrMoo}"/>
								<h:message for="sysCompanyAddrBeanAddComAddrMoo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Com Addr Soi"/>
							</f:facet>
							<h:link outcome="/sysCompanyAddr/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemComAddrSoi" value="#{_item.comAddrSoi}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCompanyAddrBeanAddComAddrSoi" maxLength="100" value="#{sysCompanyAddrBean.add.comAddrSoi}"/>
								<h:message for="sysCompanyAddrBeanAddComAddrSoi" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysCompanyAddrBean.added)}" id="sysCompanyBeanSysCompanySysCompanyAddrsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysCompanyAddrBean.add.sysCompany}" value="#{sysCompanyBean.sysCompany}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sysCompanyBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sysCompanyBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sysCompanyBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sysCompanyBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>